﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Noea.TogSim.Model.Train.LocoDriver.States
{
    public class StateFactory
    {
        private static StoppedState _stoppedState;
        private static StoppingState _stoppingState;
        private static RunningState _runningState;
        private static AccelerateState _accelerateState;
        private static WaitSignalState _waitSignalState;

        public static StoppedState StoppedState
        {
            get
            {
                if (_stoppedState == null) _stoppedState = new StoppedState();
                return _stoppedState;
            }
        }
        public static StoppingState StoppingState
        {
            get
            {
                if (_stoppingState == null) _stoppingState = new StoppingState();
                return _stoppingState;
            }

        }
        public static RunningState RunningState
        {
            get
            {
                if (_runningState == null) _runningState = new RunningState();
                return _runningState;
            }
        }
        public static AccelerateState AccelerateState
        {
            get
            {
                if (_accelerateState == null) _accelerateState = new AccelerateState();
                return _accelerateState;
            }
        }
        public static WaitSignalState WaitSignalState
        {
            get
            {
                if (_waitSignalState == null) _waitSignalState = new WaitSignalState();
                return _waitSignalState;
            }
        }
    }
}
